<script>
  let count = 0;
</script>

<button on:click="{() => count += 1}">{count}</button>